﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：QuartzModule.cs
// 功能描述：TongTongMall.Quartz
// 
// Create User：jym 2017/02/16
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Dependecy;
using TongTongMall.Modules;
using TongTongMall.Quartz.Quartz;

namespace TongTongMall.Quartz
{
    [DependsOn(typeof(KernelModule))]
    public class QuartzModule : BaseModule
    {
        public override void PreInitialize()
        {
            IocManager.Register<IQuartzConfiguration, QuartzConfiguration>();
            
        }
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
        public override void PostInitialize()
        {
            IocManager.RegisterIfNot<IJobListener, QuartzJobListener>();
        }
    }
}
